8357959: (bf) ByteBuffer.allocateDirect initialization can result in large TTSP spikes#118
Open
AAA3M wants to merge 1 commit intocorretto:developfrom
Open
8357959: (bf) ByteBuffer.allocateDirect initialization can result in large TTSP spikes#118AAA3M wants to merge 1 commit intocorretto:developfrom
AAA3M wants to merge 1 commit intocorretto:developfrom
Conversation
Contributor
|
This seems to be missing the key change in src/java.base/share/classes/java/nio/Direct-X-Buffer.java.template to actually use the new code, so I think if you run the reproducer you will not see any improvement. |
be5918c to
ece26c3
Compare
ece26c3 to
e46aada
Compare
olivergillespie
approved these changes
Sep 16, 2025
Member
|
Be aware that Corretto commit metadata should follow the OpenJDK one. Current commit would get committed with |
…large TTSP spikes Backport-of: e5ce5c57c83972ff52758a804c942986cab74ca7
e46aada to
12dc67d
Compare
Author
|
Just need to run the reproducer again with the merged file changes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ByteBuffer.allocateDirect initialization can result in large TTSP spikes
This backport adapts the JDK 26 improvement for ByteBuffer.allocateDirect initialization to reduce TTSP spikes. Minor conflict in template resolved manually to preserve 2023 copyright.
Description
This is a backport of a change made in openjdk/jdk#25487
This is a performance change that prevents large safe point pauses during ByteBuffer.allocateDirect.
Related issues
Backport of openjdk/jdk#25487
Motivation and context
This change has been added to JDK26 for a few months, and back ported to JDK25. This is a large performance gain, which would be nice to have in the 21 jdk.
How has this been tested?
This has been tested via unit test, and a reproducer run shows the performance gains from ~1s to < 1ms
https://gist.github.com/rk-kmr/be4322b72a14ae04aeefc0260c01acf6
Platform information
None
Additional context